using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SQLDAL;
using System.Data.SqlClient;

public partial class GUI_Webpage_Menu : System.Web.UI.Page
{
    #region 
    FoodBll foodBll = new FoodBll();
    SqlDataReader reader = null;
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        LoadTypeOfFoodToDataList();
        LoadFoodToDataList();
    }

    /// <summary>
    /// By: PHUONG
    /// Date: 9/5/2009
    /// This function ListFoodByType() to list all food by a type is displayed on the title above
    /// </summary>
    public void ListFoodByType()
    {
        
    }

    //This function to List type food to the title above
    public void LoadFoodToDataList()
    {
        DataList dlMenu = (DataList)dlTypeFood.Items[0].FindControl("dlMenu");
        reader = foodBll.ListAllFood();
        dlMenu.DataSource = reader;
        dlMenu.DataBind();
    }

    public void LoadTypeOfFoodToDataList()
    {
        TypeOfFoodBll tofBll = new TypeOfFoodBll();
        reader = tofBll.ListAll();
        dlTypeFood.DataSource = reader;
        dlTypeFood.DataBind();
    }
}
